/**
 * 
 */
package com.wolfpire.info.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.wolfpire.info.dao.SchoolEnterpriseCooperationDao;
import com.wolfpire.info.model.SchoolEnterpriseCooperation;
import com.wolfpire.info.service.SchoolEnterpriseCooperationService;
import com.wolfpire.system.common.Constants;
import com.wolfpire.system.common.Page;
import com.wolfpire.system.common.base.dao.IBaseHibernateDao;
import com.wolfpire.system.common.base.service.impl.BaseHibernateService;

/**
 * @author lihd
 *
 */

@Service("schoolEnterpriseCooperationService")
public class SchoolEnterpriseCooperationServiceImpl extends
		BaseHibernateService<SchoolEnterpriseCooperation, Long> implements
		SchoolEnterpriseCooperationService {

	@Override
	public List<SchoolEnterpriseCooperation> list(
			SchoolEnterpriseCooperation schoolEnterpriseCooperation) {
		return this.schoolEnterpriseCooperationDao.list(schoolEnterpriseCooperation);
	}

	@Override
	public void del(Long id) {
		SchoolEnterpriseCooperation schoolEnterpriseCooperation = this.schoolEnterpriseCooperationDao.get(id);
		if (null != schoolEnterpriseCooperation) {
			schoolEnterpriseCooperation.setDelFlag(Constants.DELETE_FLAG);
			this.schoolEnterpriseCooperationDao.saveOrUpdate(schoolEnterpriseCooperation);
		}
	}

	@Override
	public Page<SchoolEnterpriseCooperation> setPageDataList(
			Page<SchoolEnterpriseCooperation> page,
			SchoolEnterpriseCooperation filterSchoolEnterpriseCooperation) {
		return this.schoolEnterpriseCooperationDao
				.findSchoolEnterpriseCooperations(page,
						filterSchoolEnterpriseCooperation);
	}

	@Override
	protected IBaseHibernateDao<SchoolEnterpriseCooperation, Long> getEntityDao() {
		return this.schoolEnterpriseCooperationDao;
	}

	@Resource private SchoolEnterpriseCooperationDao schoolEnterpriseCooperationDao;
}
